The Xen Hypervisor currently operates a bit differently when the
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 19 Apr 2006 21:19:41 +0000 (22:19 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 19 Apr 2006 21:19:41 +0000 (22:19 +0100)
guest is being debugged. The differences are handling of int3 exception
and missed pit timer injections. The Xen hypervisor should get back to
the normal mode when the gdb connection is closed. With the attached
patch gdbserver properly detaches from the guest when the gdb detaches
or quits.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c

index 3e1f50ea49f8943071fadc20a6621e2e31d4a9ad..492aab47c011b5d87bb71ab2a865785dcb53513c 100644 (file)
@@ -664,17 +664,13 @@ main (int argc, char *argv[])
 
          For the traditional remote protocol close the connection,
          and re-open it at the top of the loop.  */
-      if (extended_protocol)
-       {
-         remote_close ();
+    detach_inferior ();
+    remote_close ();
+    if (extended_protocol)
          exit (0);
-       }
-      else
-       {
+    else
          fprintf (stderr, "Remote side has terminated connection.  "
                           "GDBserver will reopen the connection.\n");
-         remote_close ();
-       }
     sigaction(SIGINT, &old_sigaction, NULL);
     }
 }